﻿<?php
 include "../lib/BLL/dmloaidonviBLL.php";


$loaidonviBLL=new dmloaidonviBLL();
$kq="";
$id=$_GET['id'];
$loaidonvi= new dmloaidonviDAL();
$arr=$loaidonviBLL->getListdmloaidonvibyID($id);

if(isset($_POST['sua'])){
                        
    $ma=$_POST['suamadv'];
    $ten=$_POST['suatendv'];
    $loaidonvi->setdmloaidonvi($ma,$ten);
    $rs=$loaidonviBLL->updateloaidv($loaidonvi);
    if($rs==1)
        $kq= "Sửa thành công";
    else
        $kq= "Thất bại";
        }
$smarty->assign('notice',$kq);
$smarty->assign('arr',$arr);
$smarty->display('nhom3/sualoaidonvi.tpl')

?>
